﻿<UserControl x:Class="GestaltDesigner.DesignSurface"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:GestaltDesigner;assembly=GestaltDesigner">
    <Grid x:Name="LayoutRoot" Width="Auto" Background="#FF333333">
        <Grid Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Top" Height="25">
            <Rectangle RadiusX="5" RadiusY="5" x:Name="titleRect" Canvas.Left="0" Canvas.Top="0" Margin="0,0,0,0">
                <Rectangle.Fill>
                    <LinearGradientBrush EndPoint="0.481,0.111" StartPoint="0.481,0.527">
                        <GradientStop Color="#FF333333" Offset="0"/>
                        <GradientStop Color="#FF393939" Offset="0.438"/>
                    </LinearGradientBrush>
                </Rectangle.Fill>
            </Rectangle>
            <TextBlock x:Name="titleText" Canvas.Left="6" Canvas.Top="5" Foreground="#FFC2C2C2" Text="Design Surface" TextWrapping="Wrap" FontFamily="Tahoma" FontSize="11" Margin="3,-5,0,0" HorizontalAlignment="Left" VerticalAlignment="Center"/>
		</Grid>
        
        <Grid Margin="0,19,0,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="20" />
            </Grid.ColumnDefinitions>
            
            <local:XamlEditor x:Name="xamlSurface" />
            <local:PreviewPanel x:Name="previewPanel" />

            <Grid x:Name="designSurface">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition />
                    <RowDefinition />
                </Grid.RowDefinitions>
                <Image Source="hatch.png" Stretch="None" Width="1248" Height="800" Grid.Column="0" Grid.Row="0" />
                <Image Source="hatch.png" Margin="0,-1,0,0" Stretch="None" Width="1248" Height="800" Grid.Column="0" Grid.Row="1" />
                <Image Source="hatch.png" Margin="-1,0,0,0" Stretch="None" Width="1248" Height="800" Grid.Column="1" Grid.Row="0" />
                <Image Source="hatch.png" Margin="-1,-1,0,0" Stretch="None" Width="1248" Height="800" Grid.Column="1" Grid.Row="1" />
                <Canvas Grid.ColumnSpan="2" Grid.RowSpan="2" x:Name="_designSurfaceRoot" Clip="M0,0 L2496,0 L2496,1600 L0,1600 z" />
                <Canvas Grid.ColumnSpan="2" Grid.RowSpan="2" x:Name="_elementShadowLayer" Clip="M0,0 L2496,0 L2496,1600 L0,1600 z" />
                <Canvas Grid.ColumnSpan="2" Grid.RowSpan="2" x:Name="_adornerLayer" Background="#01000000" Clip="M0,0 L2496,0 L2496,1600 L0,1600 z" />
            </Grid>

            <!--<Canvas Background="#01000000">
            <TextBox AcceptsReturn="True" Canvas.Top="400" Width="auto" Height="300" />
        </Canvas>-->
            <Canvas Grid.Column="1" RenderTransformOrigin="1,0">
                <Canvas.RenderTransform>
                    <RotateTransform Angle="90" />
                </Canvas.RenderTransform>
                <ToggleButton x:Name="designSurfaceTab" Canvas.Left="20" Content="Design" Height="20" Width="70" Checked="designSurfaceTabClick" />
                <ToggleButton x:Name="xamlSurfaceTab" Canvas.Left="90" Content="XAML" Height="20" Width="70" Checked="xamlSurfaceTabClick" />
                <ToggleButton x:Name="previewTab" Canvas.Left="160" Content="Preview" Height="20" Width="70" Checked="previewTabClick" />
            </Canvas>
        </Grid>

    </Grid>

        
</UserControl>
